{
 "cells": [
  {
   "cell_type": "markdown",
   "id": "7453079d",
   "metadata": {},
   "source": [
    "# BYODT 框架\n",
    "\n",
    "BYODT(Bring Your Own Datatype) 框架允许用户在 TVM 中注册和使用自定义数据类型。"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "id": "9da964f9",
   "metadata": {},
   "outputs": [],
   "source": [
    "import numpy as np\n",
    "import pytest\n",
    "\n",
    "import tvm\n",
    "import tvm.topi.testing\n",
    "import tvm.testing\n",
    "from tvm.target.datatype import (\n",
    "    create_lower_func,  # 创建自定义数据类型的Lower函数\n",
    "    create_min_lower_func,  # 创建最小值Lower函数\n",
    "    lower_call_pure_extern,  # 处理外部函数调用\n",
    "    lower_ite,  # 处理条件分支\n",
    "    register,  # 注册自定义数据类型\n",
    "    register_min_func,  # 注册最小值函数\n",
    "    register_op,  # 注册操作\n",
    ")\n",
    "from tvm.tir.op import call_pure_extern\n",
    "from tvm.script import tir as T"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "61e17042",
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "py313",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.13.5"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
